package com.adong.tx;

import org.aspectj.lang.annotation.Aspect;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;

/**
 * @author adong
 */
@Repository
public class TxDao {
    @Autowired
    private JdbcTemplate jdbcTemplate;

    public int insert() {
        String sql = "INSERT INTO t_user (NAME,age) VALUES(?,?)";
        return jdbcTemplate.update(sql, "adong", 18);
    }
}
